{include file="public/nav"} {include file="contest/contest-nav2"}
<!-- 分割 -->
<div class="layui-container">
    <div class="fly-panel" pad20="">
        <h1 style="text-align: center;">{$list[0]['title']}</h1>
        <br>
        <ul style="text-align: center;">
            开始:<span class="layui-badge layui-bg-orange">{$list[0]['start_time']}</span>&nbsp; 结束:
            <span class="layui-badge">{$list[0]['end_time']}</span>&nbsp; 刷新:
            <span class="layui-badge layui-bg-blue">{:date('Y-m-d H:i:s',time())}</span> &nbsp; {if condition="($list[0]['private']==0)"} <span class="layui-badge layui-bg-green">公开</span> {else /} <span class="layui-badge">私人</span> {/if}
        </ul>
        <ul style="text-align: center;">
            <br/> 将于
            <span class="layui-badge layui-bg-cyan">{$list[0]['seal_time']}</span>封榜&nbsp;&nbsp; 将于
            <span class="layui-badge layui-bg-green">{$list[0]['unmake_time']}</span>解榜
            {if condition="($seal==true)"}  <span class="layui-badge">已封榜</span> {/if}
        </ul>
        <br>
        <div {if condition="(isset($navhide)&&$navhide==true)"} class="layui-hide" {/if} id="contest-link" style="text-align: center;">
            <span class="layui-breadcrumb" lay-separator="-">
          <a href="{:url('web/contest/show?cid=' . $list[0]['contest_id'] )}" style="font-size: 20px;color:red">题目</a>
          <a href="{:url('web/contest/status?cid=' . $list[0]['contest_id'] )}" style="font-size: 20px">状态</a>
          <a href="{:url('web/contest/ranklist?cid=' . $list[0]['contest_id'] )}" style="font-size: 20px">排名</a>
          <a href="{:url('web/Contestdiscuss/index?cid=' . $list[0]['contest_id'] )}" style="font-size: 20px">讨论</a>
          </span>
        </div>
        <br>
        <div class="layui-progress" lay-filter="progress-bar">
            <div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>
        </div>
        <script>
        layui.use(['element'], function() {
            var element = layui.element;
            var start_time = Date.parse("{$list[0]['start_time']}");
            var now_time = Date.parse("{:date('Y-m-d H:i:s',time())}");
            var over_time = Date.parse("{$list[0]['end_time']}");
            var percent = (now_time - start_time) / (over_time - start_time) * 100;
            element.progress('progress-bar', percent + '%');
        });
        </script>